package core.model
{
import core.service.Service;
import core.service.ServiceRequest;

import flash.events.EventDispatcher;

/**
 * ModelBase
 * @author jliang
 * 
 */
public class ModelBase extends EventDispatcher
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function ModelBase()
	{
		super();
	}
	//==========================================================================
	//  Public methods
	//==========================================================================
	public function update(data:*):void
	{
		
	}
	//==========================================================================
	//  Protected methods
	//==========================================================================    
    protected function execute(name:String, params:Array = null, responseFunc:Function = null, errorFunc:Function = null):void
    {
        var request:ServiceRequest = new ServiceRequest(name, params, responseFunc, errorFunc);        
        Service.invoke(request);
    }
}
}




